<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	 xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.prime.com.tr/ui">
<h:head>
	<title>PrimeFaces 2.2.1</title>
	<link type="text/css" rel="stylesheet"
		href="jquery-ui-1.8.20.custom.css" />
</h:head>
<h:body>

	<h:form>
		<p:dataTable id="tabelaCarros" value="#{carroBean.carros}" var="c">
			<p:column>
				<f:facet name="header">Marca</f:facet>
				<h:outputText value="#{c.marca}" />
			</p:column>
			<p:column>
				<f:facet name="header">Modelo</f:facet>
				<h:outputText value="#{c.modelo}" />
			</p:column>
			<p:column>
				<f:facet name="header">Ano</f:facet>
				<h:outputText value="#{c.ano}" />
			</p:column>
			<p:column>
				<f:facet name="header">Cor</f:facet>
				<h:outputText value="#{c.cor}" />
			</p:column>
			<p:column>
				<f:facet name="header">Placa</f:facet>
				<h:outputText value="#{c.placa}" />
			</p:column>
		</p:dataTable>

		<h:commandLink>
			<p:graphicImage value="/imagens/xls.png" />
			<p:dataExporter type="xls" target="tabelaCarros" fileName="carros" />
		</h:commandLink>
		<h:commandLink>
			<p:graphicImage value="/imagens/pdf.png" />
			<p:dataExporter type="pdf" target="tabelaCarros" fileName="carros" />
		</h:commandLink>
	</h:form>
</h:body>

</html>



